package cn.jee.jsp.util;

import cn.jee.jsp.domain.Stu;

import java.sql.ResultSet;
import java.sql.SQLException;

public class StuRowProcessor implements RowProcessor<Stu>{
  @Override
  public Stu process(ResultSet rs) throws SQLException {
    Stu stu = new Stu();
    stu.setId(rs.getLong("id"));
    stu.setName(rs.getString("name"));
    stu.setJava(rs.getDouble("java"));
    stu.setMath(rs.getDouble("math"));
    stu.setPhoto(rs.getString("photo"));
    stu.setClazzId(rs.getLong("clazz_id"));
    return stu;
  }
}
